package org.ddevil.data;

import java.util.List;


/**
 * A filter that takes a list of data and will only
 * accept Object's if they contained in the list, determined
 * via {@link java.util.List#contains(java.lang.Object)}.
 *
 * @author Rich
 */
public class ListFilter implements Filter<Object>{

    private List<Object> myList;

    public ListFilter(List<Object> myList) {
        this.myList = myList;
    }

    public boolean accept(Object arg) {
        return myList.contains(arg);
    }
}